package org.shopen.puremvc.model.domain.testing
{
	public class TestFactory
	{
		public static const DEFAULT_TEST : String = "TestFactory.DEFAULT_TEST";
		
		public static function createTest(type : String, node : XML) : Test
		{
			var test : Test = null;
			switch(type)
			{
				case InputTest.TYPE:
					test = new InputTest(node);
					break;					
				case CheckTest.TYPE:
					test = new CheckTest(node);
					break;
				case ChoiceTest.TYPE:
					test = new ChoiceTest(node);
					break;
				case Test.TYPE:					
				case DEFAULT_TEST:
					test = new Test(node);
					break;
			}
			return test;
		}
	}
}